<?php foreach($this->result as $cur){
    $obj = new Ead_Model_DbTable_Catcurso();
    $cat = $obj->fetchAll('CTC_ID = '.$cur->CTC_ID)->current();
?>
<div class="content curso-list">
    <div class="tl-img-list">
    <?php 
        $img = 'public/upload/curso/'.$cur->CUR_ID.'_icond.*';
        foreach (glob($img) as $src) {
          $img = $src;
        }
        if(file_exists($img)){ ?>
            <img src="<?php echo $this->urlbase.'/'.$img;?>" />
        <?php } else { ?>
            <a class="<?php echo $cat->CTC_CSS?>"></a>
        <?php } ?>
    </div>
    <div class="categoria">
        <?php echo $cur->CUR_NOM; ?>
        <a href="<?php echo $this->url(array('controller' => 'cursos', 'action' => 'descricao', 'id' => $cur->CUR_ID)); ?>" class="btn-button">Mais Informações</a>
    </div>
    <div class="descricao">
         <?php echo $cur->CUR_APR ?>
    </div>
    <div class="img-desc">
         <?php if(strlen($cur->CUR_DUR) > 0){ ?><span class="duracaop tp"   title="<?php echo $cur->CUR_DUR.'h '; if($cur->CUR_DURMIN > 0) echo $cur->CUR_DURMIN.'min'; ?>"></span><?php } ?>
         <?php if(strlen($cur->CUR_SML) > 0){ ?><span class="simuladorp tp" title="<?php echo $cur->CUR_SML ?>"></span><?php } ?>
         <?php if(strlen($cur->CUR_MAT) > 0){ ?><span class="materialp tp"  title="<?php echo $cur->CUR_MAT ?>"></span><?php } ?>
         <?php if($cur->CUR_VLR >= 0){ ?><span class="valorp tp"     title="<?php echo $cur->CUR_VLR ?>"></span><?php } ?>
         <?php if(strlen($cur->CUR_PROF) > 0){?><span class="professorp tp" title="<?php echo $cur->CUR_PROF?>"></span><?php } ?>
         <?php if($cur->CUR_PROM > 0 && strtotime($cur->CUR_PROMDAT) >= strtotime(date('Y-m-d'))){?><span class="promocaop tp"  title="<?php echo $cur->CUR_PROM?>"></span><?php } ?>
         <?php if($cur->CUR_QTDDIAACE > 0){ ?><span class="validadep tp"     title="<?php echo $cur->CUR_QTDDIAACE.' dias' ?>"></span><?php } ?>
         
    </div>
    <?php
    $img = 'public/upload/curso/'.$cur->CUR_ID.'_p.*';
    foreach (glob($img) as $src) {
      $img = $src;
    }
    ?>
    <img src="<?php echo $this->urlbase.'/'.$img;?>" width="270px" height="120px" />
</div>
<?php } ?>
<?php if(count($this->result) > 3){ ?>
    <div class="cont_ms_cur">
        <a href="javascript:void(0)" class="btn-button">Mais Cursos <img src="public/media/images/seta_b.png" /></a>
    </div>
<?php } ?>